/*
 * @(#)StateProvider.java	1.0 2000/12/14
 *
 * Copyright 2000 Thomas Barnekow. All Rights Reserved.
 *
 * This software is the proprietary information of Thomas Barnekow.
 * Use is subject to license terms.
 */

package tb.provider;

import tb.util.*;

/**
 * This interface can be implemented by service providers that provide access to
 * the state of persistently stored objects. It defines the individual service
 * elements "select", "insert", "update", and "delete", that
 * are grouped in the following service hierarchy:
 * <p>
 * <table cols=5>
 * <tr><td colspan=1>&nbsp;</td><td colspan=2><b>full</b></td></tr>
 * <tr><td colspan=1>&nbsp;</td><td>+---</td><td colspan=2>select</td></tr>
 * <tr><td colspan=1>&nbsp;</td><td>+---</td><td colspan=2><b>write</b></td></tr>
 * <tr><td colspan=2>&nbsp;</td><td>+---</td><td colspan=2>insert</td></tr>
 * <tr><td colspan=2>&nbsp;</td><td>+---</td><td colspan=2><b>modify</b></td></tr>
 * <tr><td colspan=3>&nbsp;</td><td>+---</td><td>update</td></tr>
 * <tr><td colspan=3>&nbsp;</td><td>+---</td><td>delete</td></tr>
 * </table>
 *
 * @author Thomas Barnekow
 * @version 1.0
 *
 * @see Provider
 */
public interface StateProvider extends Provider {

  /**
   * Top-level compound service comprising the {@link #FULL_SELECT} service
   * element and the {@link #FULL_WRITE} compound service.
   */
  public static final QualifiedName FULL =
    new QualifiedName(SERVICE, "full");

  /**
   * The "select" service element.
   */
  public static final QualifiedName FULL_SELECT =
    new QualifiedName(FULL, "select");

  /**
   * Compound service comprising the {@link #FULL_WRITE_INSERT} service element
   * and the {@link #FULL_WRITE_MODIFY} compound service.
   */
  public static final QualifiedName FULL_WRITE =
    new QualifiedName(FULL, "write");

  /**
   * The "insert" service element.
   */
  public static final QualifiedName FULL_WRITE_INSERT =
    new QualifiedName(FULL_WRITE, "insert");

  /**
   * Compound service comprising the {@link #FULL_WRITE_MODIFY_UPDATE} and
   * {@link #FULL_WRITE_MODIFY_DELETE} service elements.
   */
  public static final QualifiedName FULL_WRITE_MODIFY =
    new QualifiedName(FULL_WRITE, "modify");

  /**
   * The "update" service element.
   */
  public static final QualifiedName FULL_WRITE_MODIFY_UPDATE =
    new QualifiedName(FULL_WRITE_MODIFY, "update");

  /**
   * The "delete" service element.
   */
  public static final QualifiedName FULL_WRITE_MODIFY_DELETE =
    new QualifiedName(FULL_WRITE_MODIFY, "delete");
}
